home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / doom / qplus10.zip / PLAYER.QC < prev    next >
Text File  |  1996-08-17  |  21KB  |  768 lines

  1. void(string gibname, float dm) ThrowGib;
  2. float() random;
  3.  
  4. void() SUB_Gib =
  5. {
  6.         local vector x, y, v;
  7.         x='1 0 0';
  8.         y='0 1 0';
  9.         v=x*(50-random()*100)+y*(50-random()*100);
  10.         if (random() < 0.8)                 
  11.            SpawnMeatSpray(self.origin, v);
  12.        
  13.         else if (random() < 0.3)
  14.                 ThrowGib("progs/gib1.mdl", self.health*3);
  15.         else if (random() < 0.5)
  16.                 ThrowGib("progs/gib2.mdl", self.health*3);
  17.         else 
  18.                 ThrowGib("progs/gib3.mdl", self.health*3);
  19. };      
  20.  
  21. ///////
  22. void() SUB_Gib1 =
  23. {
  24.        local vector x, y, v;
  25.         x='1 0 0';
  26.         y='0 1 0';
  27.         v=x*(50-random()*100)+y*(50-random()*100);
  28.         if (random() < 0.8)                 
  29.            SpawnMeatSpray(self.origin, v);
  30.  
  31.         else if (random() < 0.3)
  32.                 ThrowGib("progs/gib3.mdl", self.health*3);
  33.         else if (random() < 0.5)
  34.                 ThrowGib("progs/zom_gib.mdl", self.health*3);
  35.         else
  36.                 ThrowGib("progs/gib3.mdl", self.health*3);
  37. };
  38.  
  39.  
  40. ///////
  41. void() SUB_Gib2 =
  42. {
  43.         local vector x, y, v;
  44.         x='1 0 0';
  45.         y='0 1 0';
  46.         v=x*(50-random()*100)+y*(50-random()*100);
  47.         if (random() < 0.8)                 
  48.            SpawnMeatSpray(self.origin, v);
  49.  
  50.         else if (random() < 0.3)
  51.                 ThrowGib("progs/zom_gib.mdl", self.health*3);
  52.         else if (random() < 0.5)
  53.                 ThrowGib("progs/zom_gib.mdl", self.health*3);
  54.         else
  55.                 ThrowGib("progs/gib3.mdl", self.health);
  56. };
  57.  
  58. void() bubble_bob;
  59.  
  60. /*
  61. ==============================================================================
  62.  
  63. PLAYER
  64.  
  65. ==============================================================================
  66. */
  67.  
  68. $cd /raid/quake/id1/models/player_4
  69. $origin 0 -6 24
  70. $base base        
  71. $skin skin
  72.  
  73. //
  74. // running
  75. //
  76. $frame axrun1 axrun2 axrun3 axrun4 axrun5 axrun6
  77.  
  78. $frame rockrun1 rockrun2 rockrun3 rockrun4 rockrun5 rockrun6
  79.  
  80. //
  81. // standing
  82. //
  83. $frame stand1 stand2 stand3 stand4 stand5
  84.  
  85. $frame axstnd1 axstnd2 axstnd3 axstnd4 axstnd5 axstnd6
  86. $frame axstnd7 axstnd8 axstnd9 axstnd10 axstnd11 axstnd12
  87.  
  88.  
  89. //
  90. // pain
  91. //
  92. $frame axpain1 axpain2 axpain3 axpain4 axpain5 axpain6
  93.  
  94. $frame pain1 pain2 pain3 pain4 pain5 pain6
  95.  
  96.  
  97. //
  98. // death
  99. //
  100.  
  101. $frame axdeth1 axdeth2 axdeth3 axdeth4 axdeth5 axdeth6
  102. $frame axdeth7 axdeth8 axdeth9
  103.  
  104. $frame deatha1 deatha2 deatha3 deatha4 deatha5 deatha6 deatha7 deatha8
  105. $frame deatha9 deatha10 deatha11
  106.  
  107. $frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
  108. $frame deathb9
  109.  
  110. $frame deathc1 deathc2 deathc3 deathc4 deathc5 deathc6 deathc7 deathc8
  111. $frame deathc9 deathc10 deathc11 deathc12 deathc13 deathc14 deathc15
  112.  
  113. $frame deathd1 deathd2 deathd3 deathd4 deathd5 deathd6 deathd7
  114. $frame deathd8 deathd9
  115.  
  116. $frame deathe1 deathe2 deathe3 deathe4 deathe5 deathe6 deathe7
  117. $frame deathe8 deathe9
  118.  
  119. //
  120. // attacks
  121. //
  122. $frame nailatt1 nailatt2
  123.  
  124. $frame light1 light2
  125.  
  126. $frame rockatt1 rockatt2 rockatt3 rockatt4 rockatt5 rockatt6
  127.  
  128. $frame shotatt1 shotatt2 shotatt3 shotatt4 shotatt5 shotatt6
  129.  
  130. $frame axatt1 axatt2 axatt3 axatt4 axatt5 axatt6
  131.  
  132. $frame axattb1 axattb2 axattb3 axattb4 axattb5 axattb6
  133.  
  134. $frame axattc1 axattc2 axattc3 axattc4 axattc5 axattc6
  135.  
  136. $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
  137.  
  138.  
  139. /*
  140. ==============================================================================
  141. PLAYER
  142. ==============================================================================
  143. */
  144.  
  145. void() player_run;
  146.  
  147. void()    player_stand1 =[    $axstnd1,    player_stand1    ]
  148. {
  149.     self.weaponframe=0;
  150.     if (self.velocity_x || self.velocity_y)
  151.     {
  152.         self.walkframe=0;
  153.         player_run();
  154.         return;
  155.     }
  156.  
  157.     if (self.weapon == IT_AXE)
  158.     {
  159.         if (self.walkframe >= 12)
  160.             self.walkframe = 0;
  161.         self.frame = $axstnd1 + self.walkframe;
  162.     }
  163.     else
  164.     {
  165.         if (self.walkframe >= 5)
  166.             self.walkframe = 0;
  167.         self.frame = $stand1 + self.walkframe;
  168.     }
  169.     self.walkframe = self.walkframe + 1;    
  170. };
  171.  
  172. void()    player_run =[    $rockrun1,    player_run    ]
  173. {
  174.     self.weaponframe=0;
  175.     if (!self.velocity_x && !self.velocity_y)
  176.     {
  177.         self.walkframe=0;
  178.         player_stand1();
  179.         return;
  180.     }
  181.  
  182.     if (self.weapon == IT_AXE)
  183.     {
  184.         if (self.walkframe == 6)
  185.             self.walkframe = 0;
  186.         self.frame = $axrun1 + self.walkframe;
  187.     }
  188.     else
  189.     {
  190.         if (self.walkframe == 6)
  191.             self.walkframe = 0;
  192.         self.frame = self.frame + self.walkframe;
  193.     }
  194.     self.walkframe = self.walkframe + 1;
  195. };
  196.  
  197.  
  198. void()    player_shot1 =    [$shotatt1, player_shot2    ] {self.weaponframe=1;
  199. self.effects = self.effects | EF_MUZZLEFLASH;};
  200. void()    player_shot2 =    [$shotatt2, player_shot3    ] {self.weaponframe=2;};
  201. void()    player_shot3 =    [$shotatt3, player_shot4    ] {self.weaponframe=3;};
  202. void()    player_shot4 =    [$shotatt4, player_shot5    ] {self.weaponframe=4;};
  203. void()    player_shot5 =    [$shotatt5, player_shot6    ] {self.weaponframe=5;};
  204. void()    player_shot6 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  205.  
  206. void()    player_axe1 =    [$axatt1, player_axe2    ] {self.weaponframe=1;};
  207. void()    player_axe2 =    [$axatt2, player_axe3    ] {self.weaponframe=2;};
  208. void()    player_axe3 =    [$axatt3, player_axe4    ] {self.weaponframe=3;W_FireAxe();};
  209. void()    player_axe4 =    [$axatt4, player_run    ] {self.weaponframe=4;};
  210.  
  211. void()    player_axeb1 =    [$axattb1, player_axeb2    ] {self.weaponframe=5;};
  212. void()    player_axeb2 =    [$axattb2, player_axeb3    ] {self.weaponframe=6;};
  213. void()    player_axeb3 =    [$axattb3, player_axeb4    ] {self.weaponframe=7;W_FireAxe();};
  214. void()    player_axeb4 =    [$axattb4, player_run    ] {self.weaponframe=8;};
  215.  
  216. void()    player_axec1 =    [$axattc1, player_axec2    ] {self.weaponframe=1;};
  217. void()    player_axec2 =    [$axattc2, player_axec3    ] {self.weaponframe=2;};
  218. void()    player_axec3 =    [$axattc3, player_axec4    ] {self.weaponframe=3;W_FireAxe();};
  219. void()    player_axec4 =    [$axattc4, player_run    ] {self.weaponframe=4;};
  220.  
  221. void()    player_axed1 =    [$axattd1, player_axed2    ] {self.weaponframe=5;};
  222. void()    player_axed2 =    [$axattd2, player_axed3    ] {self.weaponframe=6;};
  223. void()    player_axed3 =    [$axattd3, player_axed4    ] {self.weaponframe=7;W_FireAxe();};
  224. void()    player_axed4 =    [$axattd4, player_run    ] {self.weaponframe=8;};
  225.  
  226.  
  227. //============================================================================
  228.  
  229. void() player_nail1   =[$nailatt1, player_nail2  ] 
  230. {
  231.     self.effects = self.effects | EF_MUZZLEFLASH;
  232.  
  233.     if (!self.button0)
  234.         {player_run ();return;}
  235.     self.weaponframe = self.weaponframe + 1;
  236.     if (self.weaponframe == 9)
  237.         self.weaponframe = 1;
  238.     SuperDamageSound();
  239.     W_FireSpikes (4);
  240.     self.attack_finished = time + 0.2;
  241. };
  242. void() player_nail2   =[$nailatt2, player_nail1  ]
  243. {
  244.     self.effects = self.effects | EF_MUZZLEFLASH;
  245.  
  246.     if (!self.button0)
  247.         {player_run ();return;}
  248.     self.weaponframe = self.weaponframe + 1;
  249.     if (self.weaponframe == 9)
  250.         self.weaponframe = 1;
  251.     SuperDamageSound();
  252.     W_FireSpikes (-4);
  253.     self.attack_finished = time + 0.2;
  254. };
  255.  
  256. //============================================================================
  257.  
  258. void() player_light1   =[$light1, player_light2  ] 
  259. {
  260.     self.effects = self.effects | EF_MUZZLEFLASH;
  261.  
  262.     if (!self.button0)
  263.         {player_run ();return;}
  264.     self.weaponframe = self.weaponframe + 1;
  265.     if (self.weaponframe == 5)
  266.         self.weaponframe = 1;
  267.     SuperDamageSound();
  268.     W_FireLightning();
  269.     self.attack_finished = time + 0.2;
  270. };
  271. void() player_light2   =[$light2, player_light1  ]
  272. {
  273.     self.effects = self.effects | EF_MUZZLEFLASH;
  274.  
  275.     if (!self.button0)
  276.         {player_run ();return;}
  277.     self.weaponframe = self.weaponframe + 1;
  278.     if (self.weaponframe == 5)
  279.         self.weaponframe = 1;
  280.     SuperDamageSound();
  281.     W_FireLightning();
  282.     self.attack_finished = time + 0.2;
  283. };
  284.  
  285. //============================================================================
  286.  
  287.  
  288. void() player_rocket1   =[$rockatt1, player_rocket2  ] {self.weaponframe=1;
  289. self.effects = self.effects | EF_MUZZLEFLASH;};
  290. void() player_rocket2   =[$rockatt2, player_rocket3  ] {self.weaponframe=2;};
  291. void() player_rocket3   =[$rockatt3, player_rocket4  ] {self.weaponframe=3;};
  292. void() player_rocket4   =[$rockatt4, player_rocket5  ] {self.weaponframe=4;};
  293. void() player_rocket5   =[$